<div class="container">
    <div class="title"><span>相册系统</span></div>
    <div class="main">
        <div class="pic-upload">
            <input type="button" value="创建相册">
            
            <label for="myFile"> 上传图片
            <input type="file" name="myFile" accept="image/*" tabindex="999" multiple>
            </label>
        </div>

        <% for (let album of albumList) { %>
            <% if (album.albumName === "默认相册") { %>
                <div class="pic selected" data-name=<%= album.albumName %>>
                    <% for (let i = 0; i < album.filenames.length; i++) { %>
                        <% if (i < 15) { %>
                            <div class="img" style="display: inline-block;">
                                <img src=<%= "img/" + album.albumName + "/" + album.filenames[i] %>>
                                <div class="delete">X</div>
                            </div>
                        <% } else { %>
                            <div class="img" style="display: none;">
                                <img src=<%= "img/" + album.albumName + "/" + album.filenames[i] %>>
                                <div class="delete">X</div>
                            </div>
                        <% } %>
                    <% } %>
                </div>  
            <% } else { %>
                <div class="pic " data-name=<%= album.albumName %>>
                    <% for (let i = 0; i < album.filenames.length; i++) { %>
                        <% if (i < 15) { %>
                            <div class="img" style="display: inline-block;">
                                <img src=<%= "img/" + album.albumName + "/" + album.filenames[i] %>>
                                <div class="delete">X</div>
                            </div>
                        <% } else { %>
                            <div class="img" style="display: none;">
                                <img src=<%= "img/" + album.albumName + "/" + album.filenames[i] %>>
                                <div class="delete">X</div>
                            </div>
                        <% } %>
                    <% } %>
                </div>  
            <% } %>
        <% } %>      

        <nav>
            <span data-is-clicked="true">1</span> 
            <span data-is-clicked="false">2</span> 
            <span data-is-clicked="false">3</span> 
            <span data-is-clicked="false">4...</span> 
            <span data-is-clicked="false">末页</span> 
        </nav>
    </div>
    <div class="left">
        <% for (let album of albumList) { %>
            <div class="pic-collection">
                <a href="#"><%= album.albumName %></a>
                <button name="<%= album.albumName %>">X</button>
            </div>
        <% } %>
    </div>
</div>
<!-- <script type="text/javascript" src="/js/readfile.js"></script> -->
<%- include("../scripts/addAlbum") %>
<%- include("../scripts/deleteAlbum") %>
<%- include("../scripts/switchPage") %>
<%- include("../scripts/addImg") %>
<%- include("../scripts/deleteImg") %>
